package org.jeecg.modules.demo.hdspecialsupervision.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.hdspecialsupervision.entity.HdSpecialSupervision;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 专项监督
 * @Author: jeecg-boot
 * @Date:   2025-07-01
 * @Version: V1.0
 */
public interface HdSpecialSupervisionMapper extends BaseMapper<HdSpecialSupervision> {

    @Select("SELECT COUNT(1) FROM hd_special_supervision WHERE focus_areas = #{areaName}")
    int countByFocusAreaName(String areaName);

    @Select("SELECT id FROM hd_special_supervision WHERE pid = #{id}")
    List<String> queryTreeChildIds(String id);
}
